import { BASE_ROUTER_URL } from '@/config/env';
import ScrcpyView from '@/views/ScrcpyView.vue';
import SpiceView from '@/views/SpiceView.vue';
import VmboxView from '@/views/VmboxView.vue';
import { createRouter, createWebHistory } from 'vue-router';
import HomeView from "../views/HomeView.vue";
import UserView from '../views/UserView.vue';
import VncView from "../views/VncView.vue";
import WorkflowView from '../views/WorkflowView.vue';

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: BASE_ROUTER_URL+'/vmbox',
      name: 'vmbox',
      component: VmboxView
    },
    {
      path: BASE_ROUTER_URL+'/android',
      name: 'android',
      component: ScrcpyView
    },
    {
      path: BASE_ROUTER_URL+'/',
      name: 'home',
      component: HomeView
    },
    {
      path: BASE_ROUTER_URL+"/user",
      "name": "user",
      component: UserView
    },
    {
      path: BASE_ROUTER_URL+'/about',
      name: 'about',
      component: () => import('../views/AboutView.vue')
    },
    {
      path: BASE_ROUTER_URL+'/workflow',
      name: 'workflow',
      component: WorkflowView
    },
    {
      path: BASE_ROUTER_URL+'/vnc',
      name: 'vnc',
      component: VncView
    },
    {
      path: '/spice',
      name: 'spice',
      component: SpiceView
    },
  ]
})

export default router

